//package com.plian.system.controller.tb;
//
//import com.plian.Tools.CollectionUtil;
//import com.plian.Tools.Func;
//import com.plian.Tools.StringPool;
//import com.plian.Tools.base.BaseController;
//import com.plian.Tools.pagedata.PageData;
//import com.plian.system.config.Resubmit;
//import com.plian.system.entity.tb.TopicImplement;
//import com.plian.system.entity.tb.TripleMeetingTopic;
//import com.plian.system.model.CommonCode;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.tb.ITopicImplementService;
//import com.plian.system.vo.tb.TopicImplementVO;
//import com.plian.system.wrapper.tb.TopicImplementWrapper;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.AllArgsConstructor;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.validation.Valid;
//import java.util.List;
//
///**
// * @Author: Take-off
// * @Description: TODO
// * @Date: 2022/12/23 11:25 AM
// * @Version: 1.0
// **/
//
//@RestController
//@AllArgsConstructor
//@RequestMapping("api/topicimplement")
//@Api(value = "TripleEventController", tags = "三重一大-议题实施 控制器")
//public class TopicImplementController extends BaseController {
//
//    private final ITopicImplementService topicImplementService;
//
//    private final TopicImplementWrapper topicImplementWrapper;
//
//    @PostMapping("/detail")
//    @ApiOperation(value = "详情", notes = "传入 topicImplement")
//    public R<TopicImplementVO> detail(@RequestBody TopicImplement topicImplement) {
//        return R.data(topicImplementService.getDetailObj(topicImplement));
//    }
//
//    @PostMapping("/list")
//    @ApiOperation(value = "分页", notes = "传入query")
//    public ListResult<TopicImplementVO> list(@RequestBody Query query) {
//        return topicImplementService.list(query);
//    }
//
//    @PostMapping("/submit")
//    @Resubmit(delaySeconds = 0)
//    @ApiOperation(value = "新增或修改", notes = "传入 topicImplement")
//    public R<TopicImplement> submit(@Valid @RequestBody TopicImplement topicImplement) {
//        boolean result = topicImplementService.submit(topicImplement);
//        return result ? R.data(topicImplement) : new R(CommonCode.FAIL);
//    }
//
//    @PostMapping("/remove")
//    @ApiOperation(value = "删除", notes = "传入 ids")
//    public R remove(@RequestBody PageData pd) {
//        List<String> ids = (List<String>)pd.get("ids");
//        return topicImplementService.deleteLogic(Func.toLongList(StringUtils.join(ids, StringPool.COMMA)))
//                ? new R(CommonCode.SUCCESS) : new R(CommonCode.FAIL);
//    }
//
//    @PostMapping("/submit-implement")
//    @Resubmit(delaySeconds = 0)
//    @ApiOperation(value = "实施", notes = "传入 topicImplement")
//    public R<TopicImplement> submitImplement(@Valid @RequestBody TopicImplement topicImplement) {
//        boolean result = topicImplementService.submitImplement(topicImplement);
//        return result ? R.data(topicImplement) : new R(CommonCode.FAIL);
//    }
//
//    @PostMapping("/all-topic")
//    @ApiOperation(value = "议题列表", notes = " ")
//    public ListResult<TripleMeetingTopic> getAllTopic(){
//        ListResult<TripleMeetingTopic> result = new ListResult<>(CommonCode.SUCCESS);
//        List<TripleMeetingTopic> allTopic = topicImplementService.getAllTopic();
//        result.setList(allTopic);
//        if (CollectionUtil.isNotEmpty(allTopic)){
//            result.setTotal(allTopic.size());
//        }else {
//            result.setTotal(0);
//        }
//        return result;
//    }
//}
